# @Time : 2020/7/18 15:53
# @Author : Fioman 
# @Phone : 13149920693

"""
保证一幅图像的H通道和S通道的值不变,而将V通道的值都调整为255,即设置为最亮,可以看到艺术效果.
"""
import cv2 as cv
import numpy as np

img = cv.imread("1.png", cv.IMREAD_COLOR)
hsv = cv.cvtColor(img, cv.COLOR_BGR2HSV)

h, s, v = cv.split(hsv)

v[:, :] = 150
newHsv = cv.merge([h, s, v])
art = cv.cvtColor(newHsv,cv.COLOR_HSV2BGR)

cv.imshow("img",img)
cv.imshow("art",art)
cv.imwrite("art.png",art)
cv.waitKey(0)
cv.destroyAllWindows()
